import './styles/index.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue'
import router from './router'

import installComponents from '@/components/index'

import 'virtual:svg-icons-register'
// 权限控制
import '@/permission'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(installComponents)
app.use(createPinia())
app.use(router)

app.mount('#app')
